package com.netflix.discovery;

import com.google.inject.ImplementedBy;
import org.springframework.lang.Nullable;

import java.util.List;

@ImplementedBy(DefaultEurekaClientConfig.class)
public interface EurekaClientConfig {


    int getRegistryFetchIntervalSeconds();

    int getInstanceInfoReplicationIntervalSeconds();

    int getInitialInstanceInfoReplicationIntervalSeconds();

    int getEurekaServiceUrlPollIntervalSeconds();

    String getProxyHost();

    String getProxyPort();

    String getProxyUserName();

    String getProxyPassword();

    boolean shouldGZipContent();

    int getEurekaServerReadTimeoutSeconds();

    int getEurekaServerConnectTimeoutSeconds();

    String getBackupRegistryImpl();

    int getEurekaServerTotalConnections();

    int getEurekaServerTotalConnectionsPerHost();

    String getEurekaServerURLContext();

    String getEurekaServerPort();

    String getEurekaServerDNSName();

    boolean shouldUseDnsForFetchingServiceUrls();

    boolean shouldRegisterWithEureka();

    default boolean shouldUnregisterOnShutdown() {
        return true;
    }

    boolean shouldPreferSameZoneEureka();

    boolean allowRedirects();

    boolean shouldLogDeltaDiff();

    boolean shouldDisableDelta();

    @Nullable
    String fetchRegistryForRemoteRegions();

    String getRegion();

    String[] getAvailabilityZones(String region);

    List<String> getEurekaServerServiceUrls(String myZone);

    boolean shouldFilterOnlyUpInstances();

    int getEurekaConnectionIdleTimeoutSeconds();

    boolean shouldFetchRegistry();

    default boolean shouldEnforceFetchRegistryAtInit() {
        return false;
    }

    @Nullable
    String getRegistryRefreshSingleVipAddress();

    int getHeartbeatExecutorThreadPoolSize();

    int getHeartbeatExecutorExponentialBackOffBound();

    int getCacheRefreshExecutorThreadPoolSize();

    int getCacheRefreshExecutorExponentialBackOffBound();

    String getDollarReplacement();

    String getEscapeCharReplacement();

    boolean shouldOnDemandUpdateStatusChange();

    default boolean shouldEnforceRegistrationAtInit() {
        return false;
    }

    String getEncoderName();

    String getDecoderName();

    String getClientDataAccept();

    String getExperimental(String name);

    EurekaTransportConfig getTransportConfig();
}
